package com.tanhua.server.controller;

import com.tanhua.server.service.LocationServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
import java.util.function.ObjIntConsumer;

@RestController
@RequestMapping("/baidu")
public class LocationController {
    @Autowired
    private LocationServer locationServer;
    @PostMapping("/location")
    public ResponseEntity reportLocation(@RequestBody Map<String, Object> locationMap){
        locationServer.rerportLocation(locationMap);
        return ResponseEntity.ok(null);
    }
}
